<template>
   <div style="width: 500px;margin: 100px auto">
     <el-form label-width="100px" :data="formData">
         <el-form-item label="用户名">
             <el-input placeholder="用户名" v-model="formData.username"></el-input>
         </el-form-item>
        <el-form-item label="密码">
         <el-input placeholder="密码" v-model="formData.password"></el-input>
        </el-form-item>
         <el-button style="display: block;margin: 0 auto" @click="bind">绑定</el-button>
     </el-form>
   </div>
</template>
<script>
import {post} from "@/utils/request";
import router from "@/router";

export  default {
   data(){
     return {
       formData:{}
     }

   },
  methods:{
     bind(){
         post('/auth/bind',this.formData).then(res=>{
            router.push('/')
         })
     }
  }
}
</script>
